package com.cango.qutz.web.util;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * <p>Created by colick on 2015/6/11.</p>
 */
public class ThreadManager {

    private static ExecutorService instance = Executors.newFixedThreadPool(1);

    public static synchronized ExecutorService getInstance() {
        if (UtilHelper.isNull(instance)) {
            return Executors.newFixedThreadPool(1);
        } else {
            return instance;
        }
    }
}
